<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags" %>
<%@ page import="com.fengke.csc.config.HostConfig" %>
<%
	HostConfig hostConfig = (HostConfig) request.getSession().getServletContext().getAttribute("hostConfig");
%>
<!DOCTYPE html>
	<!--[if lt IE 7 ]> <html lang="en" class="no-js ie6"> <![endif]-->
	<!--[if IE 7 ]>    <html lang="en" class="no-js ie7"> <![endif]-->
	<!--[if IE 8 ]>    <html lang="en" class="no-js ie8"> <![endif]-->
	<!--[if IE 9 ]>    <html lang="en" class="no-js ie9"> <![endif]-->
	<!--[if (gt IE 9)|!(IE)]><!--> <html lang="en" class="no-js"><!--<![endif]-->
	<head>
		<title><%=hostConfig.getWebSiteName() %></title>
		<meta name="keywords" content="<%=hostConfig.getWebSiteName() %>" />
		<meta name="description" content="<%=hostConfig.getWebSiteName() %>" />
		<jsp:include page="../gadget/include_header.jsp"></jsp:include>
	</head>
	<body>
		<!-- 头信息 Start -->
		<jsp:include page="../gadget/main_header.jsp"></jsp:include>
		<!-- 头信息 End -->
		<jsp:include page="../gadget/main_sidebar.jsp"></jsp:include>
		<div class="main-content">
			<div class="breadcrumbs" id="breadcrumbs">
				<script type="text/javascript">
					try{ace.settings.check('breadcrumbs' , 'fixed')}catch(e){}
				</script>

				<ul class="breadcrumb">
					<li>
						<i class="icon-home home-icon"></i>
						<a href="#">首页</a>
					</li>
					<li class="active">订单管理</li>
				</ul><!-- .breadcrumb -->
			</div>
			<div class="page-content">
				<div class="page-header">
					<h1>
						订单详情
						<small>
							<i class="icon-double-angle-right"></i>
							 查看
						</small>
					</h1>
				</div><!-- /.page-header -->
				<div class="row">
					<div class="col-xs-12">
						<!-- PAGE CONTENT BEGINS -->

						<jsp:include page="../gadget/include_pageMessage.jsp"></jsp:include>
						
						<div class="tabbable">
							<ul id="order_detail_tab" class="nav nav-tabs padding-12 tab-color-blue background-blue">
								<li class="active">
									<a data-toggle="tab" href="#order_detail_order_info">订单信息</a>
								</li>

								<li>
									<a data-toggle="tab" href="#order_detail_product_info">商品信息</a>
								</li>

								<li>
									<a data-toggle="tab" href="#order_detail_member_info">成员信息</a>
								</li>
							</ul>

							<div class="tab-content">
								<div id="order_detail_order_info" class="tab-pane in active">
									<div class="table-responsive dataTables_wrapper">
										<table class="table table-striped table-bordered table-hover dataTable">
											<tr>
												<th style="text-align: right">订单编号：</th>
												<td><s:property value="orderVO.orderModel.sn" /></td>
												<th style="text-align: right">创建日期：</th>
												<td><s:date name='orderVO.orderModel.createDate' format="yyyy-MM-dd HH:mm:ss"/></td>
											</tr>
											<tr>
												<th style="text-align: right">订单状态：</th>
												<td>
													<s:property value="getText('order.status.' + orderVO.orderModel.orderStatus)" />
													<s:if test='orderVO.orderModel.expire > new java.util.Date()'>
														(失效时间：<s:date name='orderVO.orderModel.expire' format="yyyy-MM-dd HH:mm:ss"/>)
													</s:if>
													<s:else>
														(已失效)
													</s:else>
													
												</td>
												<th style="text-align: right">支付状态：</th>
												<td><s:property value="getText('payment.status.' + orderVO.orderModel.paymentStatus)" /></td>
											</tr>
											<tr>
												<th style="text-align: right">订单金额：</th>
												<td>￥
													<s:text name="format.number">
														<s:param value="orderVO.amount"/>
													</s:text>
												</td>
												<th style="text-align: right">用户名：</th>
												<td><s:property value="orderVO.orderModel.member.username" /></td>
											</tr>
											<tr>
												<th style="text-align: right">联系人姓名：</th>
												<td><s:property value="orderVO.orderModel.phoneName" /></td>
												<th style="text-align: right">联系人性别：</th>
												<td>
													<s:property value="getText('gender.' + orderVO.orderModel.gender)" />
												</td>
											</tr>
											<tr>
												<th style="text-align: right">联系人电话：</th>
												<td><s:property value="orderVO.orderModel.phone" /></td>
												<th style="text-align: right">联系人邮箱：</th>
												<td><s:property value="orderVO.orderModel.email" /></td>
											</tr>
											<tr>
												<th style="text-align: right;">地址：</th>
												<td><s:property value="orderVO.orderModel.address" /></td>
												<th style="text-align: right">附言：</th>
												<td><s:property value="orderVO.orderModel.memo" /></td>
											</tr>
										</table>
									</div>
								</div><!-- end order_detail_order_info -->

								<div id="order_detail_product_info" class="tab-pane">
									<div class="table-responsive dataTables_wrapper">
										<table class="table table-striped table-bordered table-hover dataTable">
											<tr>
												<th>订单编号</th>
												<th>主题</th>
												<th>价格</th>
												<th>数量</th>
												<th>小计</th>
											</tr>
											<s:if test="orderVO.orderItemModelList != null && orderVO.orderItemModelList.size() > 0">
												<tr>
													<td><s:property value="orderVO.orderItemModelList.get(0).sn" /></td>
													<td><s:property value="orderVO.orderItemModelList.get(0).fullName" /></td>
													<td>
														<s:text name="format.number">
															<s:param value="orderVO.orderItemModelList.get(0).price"/>
														</s:text>
													</td>
													<td><s:property value="orderVO.orderItemModelList.get(0).quantity" /></td>
													<td>
														<s:text name="format.number">
															<s:param value="orderVO.orderItemModelList.get(0).subtotal"/>
														</s:text>
													</td>
												</tr>
											</s:if>
											<s:else>
												<tr>
													<td colspan="5" style="text-align: center;">暂无产品信息</td>
												</tr>
											</s:else>
										</table>
									</div>
								</div><!-- end order_detail_product_info -->
								
								<div id="order_detail_member_info" class="tab-pane">
									<div class="table-responsive dataTables_wrapper">
										<table class="table table-striped table-bordered table-hover dataTable">
											<tr>
												<th>成员名字</th>
												<th>成员性别</th>
												<th>是否为成人</th>
											</tr>
											<s:if test="orderVO.orderItemModelList != null && orderVO.orderItemModelList.size() > 0">
												<s:iterator value="orderVO.orderItemModelList" var="orderItem" status="countIdx">
													<tr>
														<td><s:property value="#orderItem.memberName" /></td>
														<td>
															<s:property value="getText('gender.' + #orderItem.gender)" />
														</td>
														<td>
															<s:if test='#orderItem.isAdult != null && #orderItem.isAdult'>是</s:if>
															<s:elseif test='#orderItem.isAdult != null && !#orderItem.isAdult'>否</s:elseif>
														</td>
													</tr>
												</s:iterator>
											</s:if>
											<s:else>
												<tr>
													<td colspan="3" style="text-align: center;">暂无成员</td>
												</tr>
											</s:else>
										</table>
									</div>
								</div><!-- end order_detail_member_info -->
							</div>
							
						</div>
					</div>
				</div>
			</div>
		</div>
			
	<jsp:include page="../gadget/include_script.jsp"></jsp:include>
	<script type="text/javascript">
		jQuery(function($) {
			$('#sidebar_order').addClass('open');
			$('#sidebar_order').addClass('active');
			$('#sidebar_order_manager').addClass('active');
		});
	</script>
	</body>
</html>